import Vue from 'vue';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import axios from 'axios'
import qs from 'qs'
import App from './App';
import goods from 'components/goods/goods';
import home from 'components/home/home';
import order from 'components/order/order';
import payment from 'components/payment/payment';
import complete from 'components/complete/complete';
import ratings from 'components/ratings/ratings';
import seller from 'components/seller/seller';
import vuei18n from 'vue-i18n'
import 'common/stylus/index.styl';

Vue.use(VueRouter);
Vue.use(VueResource);
Vue.use(vuei18n)
const routes = [{
  path: '/',
  redirect: '/home',
  meta: {
      keepAlive: true // 需要被缓存
  }
}, {
  path: '/home',
  component: home,
  meta: {
      keepAlive: true // 需要被缓存
  }
},{
	name:'order',
  path: '/order',
  component: order
},{
	name:'payment',
  path: '/payment',
  component: payment
},{
	name:'complete',
  path: '/complete',
  component: complete
}
];



const router = new VueRouter({
  linkActiveClass: 'active',
  routes
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  render: h => h(App)
});
